home *** CD-ROM | disk | FTP | other *** search
Modula Definition | 1997-01-15 | 894 b | 24 lines | [TEXT/3PRM] |
- definition module scrap;
-
- import mac_types;
-
- NoScrapErr :== -100; // desk scrap isn't initialized
- NoTypeErr :== -102; // no data of the requested type
-
- ScrapSize :== 2400; // $960 (Long) size in bytes of desk scrap
- ScrapHandle :== 2404; // $964 (Long) handle to desk scrap in memory
- ScrapCount :== 2408; // $968 (Word) count changed by ZeroScrap
- ScrapState :== 2410; // $96A (Word) tells where desk scrap is
- ScrapName :== 2412; // $96C (String256) pointer to scrap filename (preceded by length byte)
-
- TextResourceType :== 0x54455854; // 'TEXT'
- PictResourceType :== 0x50494354; // 'PICT'
-
- // Writing to the Desk Scrap
- ZeroScrap :: !Toolbox -> (!Int,!Toolbox);
- PutScrap :: !Int !Int !Ptr !Toolbox -> (!Int,!Toolbox);
- PutScrapText :: !{#Char} !Toolbox -> (!Int,!Toolbox);
-
- // Reading from the Desk Scrap
- GetScrap :: !Handle !Int !Toolbox -> (!Int,!Int,!Toolbox);
-